package com.xwb.pojo;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

public class Life {
	Integer lid;
	String ltitle;
	String lpic;
	String lcontent;
	@JsonFormat(pattern="yyyy-MM-dd")
	Date ldate;
	Integer lzan;
	String lreview;
	
	public Integer getLid() {
		return lid;
	}
	public void setLid(Integer lid) {
		this.lid = lid;
	}
	public String getLtitle() {
		return ltitle;
	}
	public void setLtitle(String ltitle) {
		this.ltitle = ltitle;
	}
	public String getLpic() {
		return lpic;
	}
	public void setLpic(String lpic) {
		this.lpic = lpic;
	}
	public String getLcontent() {
		return lcontent;
	}
	public void setLcontent(String lcontent) {
		this.lcontent = lcontent;
	}
	public Date getLdate() {
		return ldate;
	}
	public void setLdate(Date ldate) {
		this.ldate = ldate;
	}
	public Integer getLzan() {
		return lzan;
	}
	public void setLzan(Integer lzan) {
		this.lzan = lzan;
	}
	public String getLreview() {
		return lreview;
	}
	public void setLreview(String lreview) {
		this.lreview = lreview;
	}
	
	@Override
	public String toString() {
		return "Life [lid=" + lid + ", ltitle=" + ltitle + ", lpic=" + lpic + ", lcontent=" + lcontent + ", ldate="
				+ ldate + ", lzan=" + lzan + ", lreview=" + lreview + "]";
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((lcontent == null) ? 0 : lcontent.hashCode());
		result = prime * result + ((ldate == null) ? 0 : ldate.hashCode());
		result = prime * result + ((lid == null) ? 0 : lid.hashCode());
		result = prime * result + ((lpic == null) ? 0 : lpic.hashCode());
		result = prime * result + ((lreview == null) ? 0 : lreview.hashCode());
		result = prime * result + ((ltitle == null) ? 0 : ltitle.hashCode());
		result = prime * result + lzan;
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Life other = (Life) obj;
		if (lcontent == null) {
			if (other.lcontent != null)
				return false;
		} else if (!lcontent.equals(other.lcontent))
			return false;
		if (ldate == null) {
			if (other.ldate != null)
				return false;
		} else if (!ldate.equals(other.ldate))
			return false;
		if (lid == null) {
			if (other.lid != null)
				return false;
		} else if (!lid.equals(other.lid))
			return false;
		if (lpic == null) {
			if (other.lpic != null)
				return false;
		} else if (!lpic.equals(other.lpic))
			return false;
		if (lreview == null) {
			if (other.lreview != null)
				return false;
		} else if (!lreview.equals(other.lreview))
			return false;
		if (ltitle == null) {
			if (other.ltitle != null)
				return false;
		} else if (!ltitle.equals(other.ltitle))
			return false;
		if (lzan != other.lzan)
			return false;
		return true;
	}
	
	public Life(Integer lid, String ltitle, String lpic, String lcontent, Date ldate, Integer lzan, String lreview) {
		super();
		this.lid = lid;
		this.ltitle = ltitle;
		this.lpic = lpic;
		this.lcontent = lcontent;
		this.ldate = ldate;
		this.lzan = lzan;
		this.lreview = lreview;
	}
	public Life() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	
	


	
	
	
}
